/**
 *
 * Copyright 2013 by Hai Nguyen
 *
 */
package com.avj.g17.chat.common.model;

import java.awt.Image;
import java.io.Serializable;

/**
 * User
 *
 * @author Hai Nguyen <hain186@gmail.com>
 * @version $Id: User Jan 31, 2013 1:47:57 PM hainn $
 */
public class User implements Serializable {

    public static final int STATUS_OFFLINE = 1;
    public static final int STATUS_ONLINE = 2;
    
    private String userName;
    private String password;
    private String fullName;
    private String gender;
    private int age;
    private Image avatar;

    public User() {
    }

    public User(String userName, String password, String fullName, String gender, int age) {
        this.userName = userName;
        this.password = password;
        this.fullName = fullName;
        this.gender = gender;
        this.age = age;
    }
    

    public User(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Image getAvatar() {
        return avatar;
    }

    public void setAvatar(Image avatar) {
        this.avatar = avatar;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 71 * hash + (this.userName != null ? this.userName.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final User other = (User) obj;
        if ((this.userName == null) ? (other.userName != null) : !this.userName.equals(other.userName)) {
            return false;
        }
        return true;
    }

    public void setAge(String text) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
}
